/**
 * @author zhaozhenjiang
 * 临时文件创建类
 * */

package com.auto.oracle;

import java.io.File;
import java.io.FileOutputStream;

final class createFile {
	private String base_path = null,
			       shell_name = null,
			       encode_type = "UTF-8";
	private FileOutputStream output = null;
	
	public createFile(String base_path,String shell_name){
		this.base_path = base_path;
		this.shell_name = shell_name;
	}
	
	public void init(){
		try{
			output = new FileOutputStream(new File(base_path + "/" + shell_name));
		}catch(Exception ex){}
	}
	
	public void append(String command){
		try{
			output.write(command.getBytes(encode_type));
			output.write("\n".getBytes(encode_type));
			output.flush();
		}catch(Exception ex){}
	}
	
	public void close(){
		try{
			output.close();
		}catch(Exception ex){}
	}	

	@SuppressWarnings("unused")
	private class Decompile{
		
	}
}
